package day9;
// 抛出异常
public class TestException {
    public static void main(String[] args){
        //  结果  B D E
        try{
            badMethod();
            System.out.println("A");
        }catch(RuntimeException e){
            System.out.println("B");
        }catch(Exception e){
            System.out.println("C");
        }finally {
            System.out.println("D");
        }
        System.out.println("E");
    }

    public static void badMethod(){
        throw new RuntimeException();
    }
}
